package com.itheima.controller;


import com.itheima.common.R;
import com.itheima.domain.CompanyAddress;
import com.itheima.manager.OmsCompanyAddressManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 公司收发货地址表 前端控制器
 * </p>
 *
 * @author WJZ
 * @since 2022-06-20
 */
@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private OmsCompanyAddressManager companyAddressManager;

    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public R list() {
        List<CompanyAddress> list = companyAddressManager.list();
        return R.success(list);
    }

}
